import request from '@/utils/request'
//栏目授权接口
export function sysRoleColumnQuery(data) {
  //分页列表
  return request({
    method: 'get',
    url: '/sysRoleColumn/query',
    params: data,
  })
}

export function sysRoleColumnGetRoleColumn(roleId) {
  //通过角色查询栏目权限
  return request({
    method: 'get',
    url: '/sysRoleColumn/getRoleColumn/' + roleId,
  })
}

export function sysRoleColumnGetAll(userId) {
  //栏目权限信息查询
  return request({
    method: 'get',
    url: '/sysRoleColumn/getAll/' + userId,
  })
}

export function sysRoleColumnQueryById(id) {
  //查询
  return request({
    method: 'get',
    url: '/sysRoleColumn/query/' + id,
  })
}

export function sysRoleColumnAdd(data) {
  //添加
  return request({
    method: 'post',
    url: '/sysRoleColumn/add',
    data,
  })
}

export function sysRoleColumnDelete(id) {
  //删除
  return request({
    method: 'get',
    url: '/sysRoleColumn/delete/' + id,
  })
}

export function sysRoleColumnUpdate(data) {
  //修改
  return request({
    method: 'post',
    url: '/sysRoleColumn/update',
    data,
  })
}

export function sysRoleColumnOpenApiQuery(data) {
  //分页列表
  return request({
    method: 'get',
    url: '/sysRoleColumn/openApi/query',
    params: data,
  })
}

export function sysRoleColumnClearAll(data) {
  //清空栏目授权
  return request({
    method: 'post',
    url: '/sysRoleColumn/clearAll',
    data,
  })
}
